import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import { AtList, AtListItem } from 'taro-ui'
import '../itemdetail.scss'

export default class DList extends Component {

    handleClick() {
        this.props.handleClick && this.props.handleClick()
    }

    render() {
        const {
            list = [
                {
                    title: "申请资料"
                },
                {
                    title: "合同签证"
                }
            ]
        } = this.props
        const itemList = (i, title) => {
            return <AtListItem key={i} title={title} onClick={this.handleClick.bind(this)} arrow='right'></AtListItem>
        }
        return (
            <View className='b_itemdetail__itemlist'>
                <View className='b_itemdetail__itemlist'>
                    <AtList>
                        {
                            list && list.map((item, i) => {
                                return itemList(i, item.title)
                            })
                        }
                    </AtList>
                </View>
            </View>
        )
    }
}




